/* MessageInput Styles */
.message-input-container {
  width: 100%;
}

.message-input-wrapper {
  display: flex;
  align-items: flex-end;
  gap: 8px;
  padding: 12px;
  background: #fff;
  border: 1px solid #d9d9d9;
  border-radius: 12px;
  transition: border-color 0.3s;
}

.message-input-wrapper:focus-within {
  border-color: #40a9ff;
  box-shadow: 0 0 0 2px rgba(24, 144, 255, 0.1);
}

.message-input-actions-left,
.message-input-actions-right {
  display: flex;
  align-items: center;
  gap: 4px;
}

.message-input-main {
  flex: 1;
  min-width: 0;
}

.message-input-textarea {
  width: 100%;
  border: none;
  outline: none;
  resize: none;
  font-size: 14px;
  line-height: 22px;
  font-family: inherit;
  background: transparent;
  overflow-y: auto;
  max-height: 200px;
  transition: height 0.1s ease;
}

.message-input-textarea::placeholder {
  color: #999;
}

.message-input-textarea:disabled {
  cursor: not-allowed;
  opacity: 0.6;
}

.input-action-button {
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 6px;
  transition: all 0.2s;
}

.input-action-button:hover:not(:disabled) {
  background-color: #f0f0f0;
}

.input-action-button.recording {
  color: #ff4d4f;
  animation: pulse 1.5s infinite;
}

@keyframes pulse {
  0% {
    opacity: 1;
  }
  50% {
    opacity: 0.6;
  }
  100% {
    opacity: 1;
  }
}

.send-button {
  height: 32px;
  border-radius: 6px;
}

.send-button:disabled {
  opacity: 0.4;
}

.message-input-status {
  min-height: 20px;
  padding: 4px 12px;
}

.status-indicator {
  font-size: 12px;
  color: #999;
}

.status-indicator.recording {
  color: #ff4d4f;
}

/* Mobile styles */
@media (max-width: 767px) {
  .message-input-container {
    padding: 8px 12px;
  }

  .message-input-wrapper {
    padding: 8px;
    border-radius: 8px;
    gap: 6px;
  }

  .message-input-textarea {
    font-size: 16px; /* Prevent zoom on iOS */
    min-height: 44px; /* Touch-friendly minimum */
    max-height: 120px; /* 5 lines max on mobile */
  }

  .message-input-textarea.mobile {
    min-height: 44px;
  }

  .input-action-button {
    min-width: 44px;
    min-height: 44px;
    width: 44px;
    height: 44px;
  }

  .send-button {
    min-width: 44px;
    min-height: 44px;
    height: 44px;
    border-radius: 8px;
  }

  .send-button.h-touch {
    min-width: 44px;
    min-height: 44px;
  }

  .character-count {
    font-size: 12px;
    color: #999;
  }

  .character-count.mobile {
    font-size: 11px;
  }

  .status-indicator {
    font-size: 11px;
  }
}

/* Dark mode support (future enhancement) */
@media (prefers-color-scheme: dark) {
  .message-input-wrapper {
    background: #1f1f1f;
    border-color: #434343;
  }

  .message-input-textarea {
    color: #fff;
  }

  .message-input-textarea::placeholder {
    color: #666;
  }

  .input-action-button:hover:not(:disabled) {
    background-color: #2f2f2f;
  }
}